package com.onLineCar.driver.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.onLineCar.common.core.domain.Result;
import com.onLineCar.driver.domain.entity.Discount;
import com.onLineCar.driver.domain.entity.Request.*;
import com.onLineCar.driver.domain.entity.TDriver;
import com.onLineCar.driver.domain.entity.Valuation;
import com.onLineCar.driver.domain.entity.Wallet;
import com.onLineCar.vehicle.entity.TblOrder;
import net.sf.jsqlparser.statement.insert.Insert;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 司机管理表 服务类
 * </p>
 *
 * @author dsr
 * @since 2023-12-12
 */
public interface ITDriverService extends IService<TDriver> {

    int registerDriver(TDriver tDriver);


    TDriver queryDriverByIdCard(LambdaQueryWrapper<TDriver> queryWrapper);

    IPage<TDriver> queryDriverByState(ReqCheck reqCheck);

    TDriver queryDriverListByDriverId(Integer driverId);

    int updateDriverStateById(RequestDriver requestDriver);


    boolean preemptOrder(RequestPreempt preemptOrder);

    List<TDriver> queryDriverList();


    TDriver selectDriverByName(LambdaQueryWrapper<TDriver> queryWrapper);

    Valuation valuationOrderByNumber(RequestValuation requestValuation);

    TDriver selectDriverByCarId(List<String> carId);

    boolean driverPreemptOrder(ReqDriverPreemptOrder reqDriverPreemptOrder);

    boolean redissonDriverPreempt(ReqDriverPreemptOrder reqDriverPreemptOrder);

    List<Wallet> selectWalletInfo(Integer walletId);


    List<Discount> selectDiscountInfo(Integer walletId);

    void insertWallet(Wallet wallet);

    void insertWalletPrice(ReqWallet reqWallet);

    String WalletPayMoney(WalletPay walletPay);
}
